package DieSiedler;
/*
 * HandelDialog.java
 *
 * Created on 12. April 2007, 09:52
 */

/**
 *
 * @author  Michi
 */
public class HandelDialog extends javax.swing.JDialog {
    
    /** Creates new form HandelDialog */
    public HandelDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        meineRohstoffe            = new HandelsResourcen("Meine Rohstoffe"    , 0, 0, 0, 6, 0);
        rohstoffeVomGegenspieler  = new HandelsResourcen("Rohstoffe von Horst", 2, 4, 0, 0, 0);
        meineRohstoffe.setEditable(false);
        rohstoffeVomGegenspieler.setEditable(false);
        
        jPanel7.add(meineRohstoffe);
        jPanel7.add(rohstoffeVomGegenspieler);
        
        setLocation(500,200);
        setSize(400,430);
        setVisible(true);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Erzeugter Quelltext ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jPResource = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jPControl = new javax.swing.JPanel();
        JPHandeln = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        JPCancel = new javax.swing.JPanel();
        jButton2 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Handel");
        setModal(true);
        jPResource.setLayout(new java.awt.GridLayout(1, 0));

        jPanel7.setLayout(new java.awt.GridLayout(1, 0));

        jPResource.add(jPanel7);

        getContentPane().add(jPResource, java.awt.BorderLayout.CENTER);

        jPControl.setLayout(new java.awt.GridLayout(1, 0));

        jButton1.setText("Handeln");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                handelVorschlagen(evt);
            }
        });

        JPHandeln.add(jButton1);

        jPControl.add(JPHandeln);

        jButton2.setText("Cancel");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                handelAbbrechen(evt);
            }
        });

        JPCancel.add(jButton2);

        jPControl.add(JPCancel);

        getContentPane().add(jPControl, java.awt.BorderLayout.SOUTH);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void handelAbbrechen(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handelAbbrechen
// TODO add your handling code here:
        setVisible(false);
    }//GEN-LAST:event_handelAbbrechen

    private void handelVorschlagen(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handelVorschlagen
// TODO add your handling code here:
        setVisible(false);
    }//GEN-LAST:event_handelVorschlagen
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new HandelDialog(new javax.swing.JFrame(), true).setVisible(true);
            }
        });
    }
    
    // Variablendeklaration - nicht modifizieren//GEN-BEGIN:variables
    private javax.swing.JPanel JPCancel;
    private javax.swing.JPanel JPHandeln;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JPanel jPControl;
    private javax.swing.JPanel jPResource;
    private javax.swing.JPanel jPanel7;
    // Ende der Variablendeklaration//GEN-END:variables
    private HandelsResourcen meineRohstoffe;
    private HandelsResourcen rohstoffeVomGegenspieler;
}